// 选择所属机房
import request from '@/utils/request'
import { ParamArr } from '../../public/js/paramarr'

export function getWindowsScheduleList() {
  return request({
    dmName: 'THomeDM',
    lpName: 'GetWindowsScheduleList',
    vPar: new ParamArr()
  })
}
export function getWindowsSchedule(data) {
  return request({
    dmName: 'THomeDM',
    lpName: 'GetWindowsSchedule',
    vPar: data
  })
}
export function addWindowsSchedule(data) {
  return request({
    dmName: 'THomeDM',
    lpName: 'AddWindowsSchedule',
    vPar: data
  })
}
export function setWindowsSchedule(data) {
  return request({
    dmName: 'THomeDM',
    lpName: 'SetWindowsSchedule',
    vPar: data
  })
}
export function delWindowsSchedule(data) {
  return request({
    dmName: 'THomeDM',
    lpName: 'DelWindowsSchedule',
    vPar: data
  })
}
// 增加分组
export function addWindowsScheduleGroup(data) {
  return request({
    dmName: 'THomeDM',
    lpName: 'AddWindowsScheduleGroup',
    vPar: data
  })
}
// 删除分组
export function delWindowsScheduleGroup(data) {
  return request({
    dmName: 'THomeDM',
    lpName: 'DelWindowsScheduleGroup',
    vPar: data
  })
}
// 修改分组
export function setWindowsScheduleGroup(data) {
  return request({
    dmName: 'THomeDM',
    lpName: 'SetWindowsScheduleGroup',
    vPar: data
  })
}

// 获取流程模板、组件模板数据
export function getTemplateList(data) {
  return request({
    dmName: 'THomeDM',
    lpName: 'GetTemplateList',
    vPar: data
  })
}

// 修改流程模板分组名称
export function setTemplateGroup(data) {
  return request({
    dmName: 'THomeDM',
    lpName: 'SetTemplateGroup',
    vPar: data
  })
}

// 删除流程模板分组
export function delTemplateGroup(data) {
  return request({
    dmName: 'THomeDM',
    lpName: 'DelTemplateGroup',
    vPar: data
  })
}

// 删除流程模板流程
export function delTemplate(data) {
  return request({
    dmName: 'THomeDM',
    lpName: 'DelTemplate',
    vPar: data
  })
}

// 增加模板分组
export function newTemplateGroup(data) {
  return request({
    dmName: 'THomeDM',
    lpName: 'NewTemplateGroup',
    vPar: data
  })
}

// 获取模板信息
export function getTemplate(data) {
  return request({
    dmName: 'THomeDM',
    lpName: 'GetTemplate',
    vPar: data
  })
}

// 新建模板
export function newTemplate(data) {
  return request({
    dmName: 'THomeDM',
    lpName: 'NewTemplate',
    vPar: data
  })
}

// 修改模板
export function setTemplate(data) {
  return request({
    dmName: 'THomeDM',
    lpName: 'SetTemplate',
    vPar: data
  })
}

// 获取模板数据
export function webGetTemplateData(fileObj) {
  return request({
    dmName: 'THomeDM',
    lpName: 'WebGetTemplateData',
    upload: true,
    fileObj: fileObj,
    vPar: new ParamArr()
  })
}

export function getProgramList(data) {
  return request({
    dmName: 'THomeDM',
    lpName: 'GetProgramList',
    vPar: data
  })
}

// 获取全局变量数据
export function getWebHome(data) {
  return request({
    dmName: 'THomeDM',
    lpName: 'GetWebHome',
    vPar: data
  })
}

// 获取首页信息
export function getWebHomePage(vPar) {
  return request({
    dmName: 'THomeDM',
    lpName: 'GetWebHomePage',
    vPar
  })
}

// 获取首页菜单
export function getWebUserRoleMenu(vPar) {
  return request({
    dmName: 'THomeDM',
    lpName: 'GetWebUserRoleMenu',
    vPar
  })
}

// 设置首页信息
export function setWebHomeList(vPar) {
  return request({
    dmName: 'THomeDM',
    lpName: 'SetWebHomeList',
    vPar
  })
}

// 获取机器方案列表
export function getAgentPlanList(vPar) {
  return request({
    dmName: 'THomeDM',
    lpName: 'GetAgentPlanList',
    vPar
  })
}

// 获取机器方案
export function getAgentPlan(vPar) {
  return request({
    dmName: 'THomeDM',
    lpName: 'GetAgentPlan',
    vPar
  })
}

export function synCoreGroup() {
  return request({
    dmName: 'THomeDM',
    lpName: 'SynCoreGroup',
    vPar: new ParamArr()
  })
}

// 声音禁用
export function stopAgentMusic(vPar) {
  return request({
    dmName: 'THomeDM',
    lpName: 'StopAgentMusic',
    vPar
  })
}

export function getRobotQuery(vPar) {
  return request({
    dmName: 'THomeDM',
    lpName: 'GetRobotQuery',
    vPar
  })
}
// 运行统计初始化
export function getRobotFlowQuery(data) {
  return request({
    dmName: 'THomeDM',
    lpName: 'GetRobotFlowQuery',
    vPar: data
  })
}

export function outFlowLog(vPar) {
  return request({
    dmName: 'THomeDM',
    lpName: 'OutFlowLog',
    vPar
  })
}

export function getComponentTask(vPar) {
  return request({
    dmName: 'THomeDM',
    lpName: 'GetComponentTask',
    vPar
  })
}
